<div class="title"><?= image_tag('icons/dark/login.png', array('class' => 'titleIcon')); ?><h6>Login panel</h6></div>
<?php if ($error): ?>
    <div class="red" style="padding-left: 20px;">
        <p><b><?= $error ?></b></p>
    </div>
<?php endif; ?>
<form class="form" id="loginForm" action="<?php echo url_for("login/login"); ?>" method="post">
    <fieldset>


        <div class="formRow">
            <label for="login">Username:</label>
            <div class="loginInput">
                <?php echo $form['username']->render(array("class" => "required")); ?>
                <label for="username" generated="true" class="error"><?= $form['username']->renderError(); ?></label>
            </div>
        </div>

        <div class="formRow">
            <label for="pass">Password:</label>
            <div class="loginInput">
                <?php echo $form['password']->render(array("class" => "required")); ?>
                <?php if ($form['password']->hasError()): ?><label for="username" generated="true" class="error"><?= $form['password']->renderError(); ?></label><?php endif; ?>
            </div>
        </div>

        <div class="loginControl">
            <input value="Log me in" class="dredB logMeIn" type="submit">
        </div>


    </fieldset>


    <?php echo $form['_csrf_token']; ?>
</form>